package com.bawei.fuxi.base.http;

import com.bawei.fuxi.base.utils.ConstantUtils;
import com.bawei.fuxi.entity.BannerEntity;
import com.bawei.fuxi.entity.GiftEntity;
import com.bawei.fuxi.entity.LoginEntity;
import com.bawei.fuxi.entity.ResultEntity;
import com.bawei.fuxi.entity.VideoEntity;


import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiServer {
    @GET(ConstantUtils.VIDEO_URL)
    Observable<VideoEntity> video(@Query("currentPage") int currentPage, @Query("pageSize") int pageSize);

    @GET(ConstantUtils.SEARCH_URL)
    Observable<VideoEntity> search(@Query("keywords") String keywords);

    @GET(ConstantUtils.BANNER_URL)
    Observable<BannerEntity> banner();


    @POST(ConstantUtils.LOGIN_URL)
    Observable<LoginEntity> login(@Body RequestBody requestBody);


    @POST(ConstantUtils.LOVE_URL)
    Observable<ResultEntity> dianzan(@Query("videoId") int videoId);

    @POST(ConstantUtils.GUANZHU_URL)
    Observable<ResultEntity> guanzhu(@Body RequestBody requestBody);
    //礼物
    @GET(ConstantUtils.GIFT_URL)
    Observable<GiftEntity> gift();

}
